<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>cat writebug.cn/history</title>
  <meta name="author" content="zhiliao">
  <meta name="description" content="writebug博客网，一个开发者的技术博客。" />

  <meta name="keywords" content="开发者,程序,博客园,程序猿,程序媛,极客,码农,编程,代码,软件开发,开源,IT网站,技术社区,Developer,Programmer,Coder,Geek,Coding,Code,writebug,bug,写bug,linux,vim,编程语言,调试" />

  <link href="/feeds/all.atom.xml" type="application/rss+xml" rel="alternate"
        title="cat writebug.cn/history RSS Feed" />



  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">


    <link href="/favicon.png" rel="icon">

  <link href="/theme/css/main.css" media="screen, projection"
        rel="stylesheet" type="text/css">
  <link href="/theme/css/pygment.css" rel="stylesheet" type="text/css">

  <!--
  <link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  <link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  -->


  <script src="/theme/js/modernizr-2.0.js"></script>
  <script src="/theme/js/ender.js"></script>
  <script src="/theme/js/octopress.js" type="text/javascript"></script>
</head>

<body >
  <header role="banner"
  >
<hgroup>
  <h1><a href="/">cat writebug.cn/history</a></h1>
    <h2>一个开发者的技术博客。</h2>
</hgroup></header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/feeds/all.atom.xml" rel="subscribe-rss">RSS</a></li>
</ul>


<ul class="main-navigation">
    <li><a href="/">Home</a></li>
    <li><a href="/archives.html">Archive</a></li>
    <li><a href="/pages/todolist.html">TodoList</a></li>
    <li><a href="/pages/about.html">About</a></li>
</ul></nav>
  <div id="main">
    <div id="content">
<div class="blog-index">
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/filesystem.html">磁盘分区，文件系统有关的命令</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><p>partx -a # 通知内核重新读取硬盘分区表</p>
<p>partprobe # 同上，告诉内核分区表改变了</p>
<p>mkfs.btrfs -m dup /dev/sda1</p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/iperf3.html">iperf3测试带宽</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><h1>TCP</h1>
<p>服务端<code>iperf3 -s -p 12345</code></p>
<p>客户端测试上传到服务器<code>iperf3 -c server_host -p 12345</code></p>
<p>客户端测试从服务器下载<code>iperf3 -c server_host -p 12345 -R</code></p>
<h1>UDP</h1>
<p>客户端添加 -u …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/07/iperf3.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/mysql-password.html">mysql 中修改root密码</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><p>整理了以下四种在MySQL中修改root密码的方法,可能对大家有所帮助!</p>
<h4>方法1： 用SET PASSWORD命令</h4>
<div class="highlight-custom"><pre><span></span><code><span class="w">　　</span><span class="nv">mysql</span><span class="w"> </span><span class="o">-</span><span class="nv">u</span><span class="w"> </span><span class="nv">root</span>
<span class="w">　　</span><span class="nv">mysql</span><span class="o">&gt;</span><span class="w"> </span><span class="nv">SET</span><span class="w"> </span><span class="nv">PASSWORD</span><span class="w"> </span><span class="k">FOR</span><span class="w"> </span><span class="s1">&#39;root&#39;</span>@<span class="s1">&#39;localhost&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">PASSWORD</span><span class="ss">(</span><span class="s1">&#39;newpass&#39;</span><span class="ss">)</span><span class="c1">;</span>
</code></pre></div>

<h4>方法2：用 …</h4></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/07/mysql-password.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/programming-notes.html">记录一些网址</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><p>dht爬虫</p>
<p>http://codemacro.com/2013/05/19/crawl-dht/</p>
<p>http://developer.51cto.com/art/201402/430007.htm</p>
<p>Gtk相关</p>
<p>http://gtk.awaysoft.com/forum.php</p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/swappiness.html">swappiness交换分区配置</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code>swappiness=0的时候表示最大限度使用物理内存，然后才是 swap空间，swappiness＝100的时候表示积极的使用swap分区，并且把内存上的数据及时 …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/07/swappiness.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/vim-fold.html">vim折叠设置</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="x">vim折叠设置</span>
<span class="x">set foldmethod=indent &quot;set default foldmethod</span>
<span class="x">&quot;zi 打开关闭折叠</span>
<span class="x">&quot;zv 查看此行</span>
<span class="x">zm 关闭折叠</span>
<span class="x">zM 关闭所有</span>
<span class="x">zr 打开</span>
<span class="x">zR 打开所有</span>
<span class="x">zc 折叠当前行</span>
<span class="x">zo 打开 …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/07/vim-fold.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/vim-sort.html">vim 排序文字</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><p>可以用 <code>ctrl-V</code> 选中后输入 <code>:sort</code> 排序</p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/07/xdg-mime.html">Linux环境下文件关联的设置xdg-mime</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-07T00:00:00+08:00" pubdate>2017-06-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="n">xdg-utils</span>
<span class="n">从网上下载了几本中文pdf文档，用系统自带的Evince——文档查看器打开后出现乱码。想到FoxitReader有个linux版本，于是从其官方网站下 …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/07/xdg-mime.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/03/apt-size-mismatch.html">apt install 一直 size mismatch</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-03T08:32:00+08:00" pubdate>2017-06-03 08:32:00</time>      
    </p>
</header>

        <div class="entry-content"><p>raspberry pi 的 debian， apt安装软件是一直提示 size mismatch。
后来发现这是运营商(ISP)缓存的问题， 运营商有些时候是通过文件名作为缓存的， 导 …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/03/apt-size-mismatch.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2017/06/03/pelican.html">pelican博客搭建总结</a>
      </h1>
    <p class="meta">
<time datetime="2017-06-03T06:56:00+08:00" pubdate>2017-06-03 06:56:00</time>      
    </p>
</header>

        <div class="entry-content"><h4>pelican介绍</h4>
<p><a href="https://getpelican.com/" title="pelican">Pelican</a> 是用Python实现的一个静态网站生成器. 支持以下功能：</p>
<ul>
<li>使用 Markdown 或 reStructuredText 或 AsciiDoc 来编写内容</li>
<li>生成静态网页</li>
<li>支持许多主题与 …</li></ul></div>
            <footer>
                <a rel="full-article" href="/posts/2017/06/03/pelican.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2015/06/18/gtags.html">gtags使用</a>
      </h1>
    <p class="meta">
<time datetime="2015-06-18T13:50:00+08:00" pubdate>2015-06-18 13:50:00</time>      
    </p>
</header>

        <div class="entry-content"><h5>gtags global</h5>
<p>安装好以后，有global、gtags、gtags-cscope三个命令。global是查询，gtags是生成索引文件，gtags-cscope是与cscope一样的界面</p>
<h5>example：</h5>
<p>代码:</p>
<div class="highlight-custom"><pre><span></span><code>$<span class="w"> </span><span class="nb">cd</span><span class="w"> </span>project/
$<span class="w"> </span>gtags
</code></pre></div>

<p>这样就生成了整个 …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2015/06/18/gtags.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2015/01/20/man-pages-to-pdf.html">将man page输出到pdf和HTML</a>
      </h1>
    <p class="meta">
<time datetime="2015-01-20T16:37:00+08:00" pubdate>2015-01-20 16:37:00</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="c1"># 方法1：直接浏览器查看html</span>
man<span class="w"> </span>-Hfirefox<span class="w"> </span>memfd_create


<span class="c1"># 方法2：查询手册页文件位置</span>
man<span class="w"> </span>-w<span class="w"> </span>timerfd_create<span class="w">  </span><span class="c1"># 或 man -w 2 timerfd_create</span>
<span class="c1"># 然后转换为html</span>
zcat<span class="w"> </span>/usr/share/man/man2/timerfd_create …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2015/01/20/man-pages-to-pdf.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2015/01/20/linux-man-pages.html">linux-man-pages</a>
      </h1>
    <p class="meta">
<time datetime="2015-01-20T11:41:06+08:00" pubdate>2015-01-20 11:41:06</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="n">man</span><span class="w"> </span><span class="o">-</span><span class="n">k</span><span class="w"> </span><span class="err">关键字</span><span class="w">  </span><span class="err">从</span><span class="n">man手册页描述内容中搜索</span>
<span class="n">man</span><span class="w"> </span><span class="o">-</span><span class="n">K</span><span class="w"> </span><span class="err">全文暴力搜索，</span><span class="w"> </span><span class="err">速度比较慢</span>
<span class="n">man</span><span class="w"> </span><span class="o">-</span><span class="n">a</span><span class="w"> </span><span class="err">显示手册中包含的所有可用的手册页</span>
<span class="n">whatis</span>
<span class="n">which …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2015/01/20/linux-man-pages.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2015/01/10/coreutils.html">coreutils</a>
      </h1>
    <p class="meta">
<time datetime="2015-01-10T10:31:00+08:00" pubdate>2015-01-10 10:31:00</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="nv">arch</span><span class="w"> </span>#<span class="w"> </span>显示机器的架构
<span class="nv">basenc</span><span class="w"> </span>#<span class="w"> </span>编码解码数据（<span class="nv">base32</span>等）
<span class="nv">cksum</span><span class="w"> </span>#<span class="w"> </span>校验文件<span class="nv">CRC</span>
<span class="nv">expand</span><span class="w"> </span>#<span class="w"> </span>将制表符转化为空格
<span class="nv">factor</span><span class="w"> </span>#<span class="w"> </span>分解质因数
<span class="nv">fmt</span><span class="w"> </span>#<span class="w"> </span>简单的格式化文本，<span class="w"> </span>折行 …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2015/01/10/coreutils.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2015/01/07/linux-primer.html">linux入门</a>
      </h1>
    <p class="meta">
<time datetime="2015-01-07T00:00:00+08:00" pubdate>2015-01-07 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><p>man intro # 用户命令介绍
man hier # 文件系统描述
man file-hierarchy # # 文件系统描述
vimtutor # vim教程</p></div>
  		</article>
<div class="pagination">
    <a class="prev" href="/index7.html">&larr; Older</a>

    <a class="next" href="/index5.html">Newer &rarr;</a>
  <br />
</div></div>

<aside class="sidebar">
<section>
  <h1>Recent Posts</h1>
  <ul id="recent_posts">
    <li class="post">
        <a href="/posts/2023/08/22/bash-conversion.html">bash进制转换</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/16/remap-caps-ctrl.html">在Linux下交换Ctrl与大写锁定键</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/15/learn-java.html">java入门精粹</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/04/tcl-expect.html">Tcl 和 expect教程</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/01/armbian-config-software.html">armbian-config 支持自动安装的软件</a>
    </li>
  </ul>
</section><section>
  <h1>Categories</h1>
    <ul id="recent_posts">
      <li><a href="/category/android.html">android (2)</a></li>
      <li><a href="/category/blog.html">blog (1)</a></li>
      <li><a href="/category/bootloader.html">bootloader (2)</a></li>
      <li><a href="/category/container.html">container (1)</a></li>
      <li><a href="/category/database.html">database (1)</a></li>
      <li><a href="/category/editor.html">editor (4)</a></li>
      <li><a href="/category/filesystem.html">filesystem (1)</a></li>
      <li><a href="/category/firefox.html">firefox (1)</a></li>
      <li><a href="/category/git.html">git (4)</a></li>
      <li><a href="/category/golang.html">golang (1)</a></li>
      <li><a href="/category/gu-piao.html">股票 (1)</a></li>
      <li><a href="/category/ide.html">IDE (1)</a></li>
      <li><a href="/category/interview.html">interview (1)</a></li>
      <li><a href="/category/linux.html">linux (51)</a></li>
      <li><a href="/category/network.html">network (7)</a></li>
      <li><a href="/category/nltk.html">nltk (2)</a></li>
      <li><a href="/category/notes.html">notes (1)</a></li>
      <li><a href="/category/other.html">other (1)</a></li>
      <li><a href="/category/programming.html">programming (10)</a></li>
      <li><a href="/category/python.html">python (1)</a></li>
      <li><a href="/category/software.html">software (1)</a></li>
      <li><a href="/category/stock.html">stock (1)</a></li>
      <li><a href="/category/storage.html">storage (2)</a></li>
      <li><a href="/category/vm.html">vm (1)</a></li>
      <li><a href="/category/web.html">web (4)</a></li>
      <li><a href="/category/windows.html">windows (1)</a></li>
      <li><a href="/category/xwindow.html">xwindow (1)</a></li>
  </ul>
</section>
<section>
  <h1>Tags</h1>
    <a href="/tag/linux.html">linux</a>,    <a href="/tag/bash.html">bash</a>,    <a href="/tag/xwindow.html">Xwindow</a>,    <a href="/tag/programming-language.html">programming-language</a>,    <a href="/tag/java.html">java</a>,    <a href="/tag/programming.html">programming</a>,    <a href="/tag/software.html">software</a>,    <a href="/tag/storage.html">storage</a>,    <a href="/tag/debug.html">debug</a>,    <a href="/tag/c.html">C</a>,    <a href="/tag/git.html">git</a>,    <a href="/tag/patch.html">patch</a>,    <a href="/tag/text.html">text</a>,    <a href="/tag/selenium.html">selenium</a>,    <a href="/tag/web.html">web</a>,    <a href="/tag/docker.html">docker</a>,    <a href="/tag/flatpak.html">flatpak</a>,    <a href="/tag/interview.html">interview</a>,    <a href="/tag/qt.html">Qt</a>,    <a href="/tag/opensuse.html">openSUSE</a>,    <a href="/tag/filesystem.html">filesystem</a>,    <a href="/tag/ide.html">IDE</a>,    <a href="/tag/glang.html">glang</a>,    <a href="/tag/xdg.html">xdg</a>,    <a href="/tag/network.html">network</a>,    <a href="/tag/raspberry.html">raspberry</a>,    <a href="/tag/vm.html">vm</a>,    <a href="/tag/windows.html">windows</a>,    <a href="/tag/gdb.html">gdb</a>,    <a href="/tag/debian.html">debian</a>,    <a href="/tag/archlinux.html">archlinux</a>,    <a href="/tag/phicomm.html">phicomm</a>,    <a href="/tag/kernel.html">kernel</a>,    <a href="/tag/ext4.html">ext4</a>,    <a href="/tag/server.html">server</a>,    <a href="/tag/stock.html">stock</a>,    <a href="/tag/shu.html">书</a>,    <a href="/tag/gu-piao.html">股票</a>,    <a href="/tag/python.html">python</a>,    <a href="/tag/nltk.html">nltk</a>,    <a href="/tag/command.html">command</a>,    <a href="/tag/shell.html">shell</a>,    <a href="/tag/terminal.html">terminal</a>,    <a href="/tag/other.html">other</a>,    <a href="/tag/wireless.html">wireless</a>,    <a href="/tag/android.html">android</a>,    <a href="/tag/gtk.html">gtk+</a>,    <a href="/tag/gnome.html">gnome</a>,    <a href="/tag/keyboard.html">keyboard</a>,    <a href="/tag/firefox.html">firefox</a>,    <a href="/tag/arch.html">arch</a>,    <a href="/tag/database.html">database</a>,    <a href="/tag/mysql.html">mysql</a>,    <a href="/tag/notes.html">notes</a>,    <a href="/tag/sysctl.html">sysctl</a>,    <a href="/tag/vim.html">vim</a>,    <a href="/tag/editor.html">editor</a>,    <a href="/tag/pelican.html">pelican</a>,    <a href="/tag/blog.html">blog</a>,    <a href="/tag/book.html">book</a>,    <a href="/tag/bootloader.html">bootloader</a></section>
    <section>
        <h1>Social</h1>
        <ul>
            <li><a href="https://github.com/zhangjiaxing" target="_blank">github</a></li>
            <li><a href="http://wpa.qq.com/msgrd?v=3&uin=347820393&site=qq&menu=yes" target="_blank">qq</a></li>
            <li><a href="http://www.writebug.cn" target="_blank">blog</a></li>
            <li><a href="http://gallery.writebug.cn" target="_blank">gallery</a></li>
        </ul>
    </section>
    <section>
        <h1>Blogroll</h1>
        <ul>
            <li><a href="http://getpelican.com/" target="_blank">Pelican</a></li>
        </ul>
    </section>

</aside>
    </div>
  </div>
  <footer role="contentinfo">
<p>
    Copyright &copy;  2013&ndash;2023  zhiliao &mdash;
  <span class="credit">Powered by <a href="http://getpelican.com">Pelican</a></span>
</p>  </footer>
</body>
</html>